Skip to content

Fix check_checksums when using templates, patch-dicts or checksums.json#5021

Open
Flamefire wants to merge 9 commits intoeasybuilders:developfrom
Flamefire:ext-checksums-json
Open

Fix check_checksums when using templates, patch-dicts or checksums.json#5021
Flamefire wants to merge 9 commits intoeasybuilders:developfrom
Flamefire:ext-checksums-json

Conversation

@Flamefire
Copy link
Contributor

This is a similar fix as easybuilders/easybuild-easyconfigs#15973

check_checksums had various shortcomings, some touched by 7112e40 (from @boegel ) which disabled templating entirely when getting the exts_list list.

This breaks when checksums.json is used: It will report missing checksums even when they are available in the checksums.json
Additionally templates in the name/version of extension won't be resolved causing the error message harder to understand

A quick fix was to replace the above commit by allow_unresolved_templates-decorator to allow partially resolved extensions but don't fail as before when templates are used e.g. in install_cmd which fixes the issues with the name/version of the extension

However that resolves too deep as inside the extension options different template values must be used.

We have collect_exts_file_info which does handle all those peculiarities of the extension specs already so just use that.

This also handles the default file name of extension sources and nosource which we can rely on here if it fills sources correctly. This requires #4054 (merged here so that tests pass)

It also fixes a failure when patches were specified as dicts as In sources the keyname is "filename" while in patches it is "name" which causes a KeyError in check_checksums_for

In `sources` the keyname is "filename" while in `patches` it is "name".
…st' easyconfig parameter value in EasyBlock.check_checksums"

This reverts commit 7112e40.
This requires correctly resolving the templates in `exts_list`
sources/patches to be able to fetch them from the JSON file.
@Flamefire
Copy link
Contributor Author

@boegel This might be useful to include in the release as it fixes multiple subtle issues in how checksums are handled in the checks. Especially by replacing duplicated logic by collect_exts_file_info making it a lot more reliable.

A big chunk is just refactoring to avoid duplication, see individual commits.

This code is heavily exercised on easyconfigs CI so running a few PR CIs after merging this should discover any hidden issues that the added tests didn't catch.

…le_info`

The returned dict per extension has a 'patches' key but no 'sources'.
Add this incoorporating `source_tmpl` or the default value.
Add test for that and also for `nosource: True` and `sources` being a list.
@boegel boegel added the bug fix label Jan 14, 2026
@boegel boegel added this to the next release (5.2.1?) milestone Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants